<template>
	<div>		
		<template>
			<el-table v-loading="tableDataLoading" :data="tableData" border style="width: 100%;margin-top:30px">
				<el-table-column prop="id" label="id" ></el-table-column>
				<el-table-column prop="user" label="用户名" ></el-table-column>
				<el-table-column prop="admin" :formatter="formatAdmin" label="管理员"></el-table-column>
			</el-table>
		</template>
	</div>

</template>

<script>
export default {
  data() {
    return {
      tableDataLoading: false,
      tableData: []
    };
  },
  created() {},
  mounted() {
    this.getUserList("admin/getUserList");
  },
  components: {},
  computed: {},
  methods: {
    getUserList: async function(url, data) {
      let _this = this;
      let response = await _this.http.get(url, data, _this);
      _this.tableData = response.data.data;
      _this.saverFn.httpSuccess(_this, response, null, function() {
        _this.tableDataLoading = false;
      });
    },
    formatAdmin: function(row, column, cellValue) {
      if (cellValue == "1") {
        return "是";
      } else {
        return "否";
      }
    }
  }
};
</script>
<style lang="less" scoped>
@import "../../public/pubilcColor.less";

#hello {
  background: @bgcolor;
  padding: 50px 50px 80px;
  border-radius: 5px;
}
h1 {
  font-size: 50px;
  font-weight: 800;
  margin-bottom: 30px;
}
p {
  font-size: 25px;
}
</style>
